package cn.exrick.xboot.common.utils.jiuqi.utils;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: njp
 * @Date: 2020/07/06/16:46
 * @Description:
 */
public class CommonUtil {
    /**
     * 获取指定格式的时间格式
     *
     * @return
     */
    public static Date getTime() {
        //取当前时间
        Date nowdate = new Date();
        //转换时间格式
        SimpleDateFormat simpleDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date timestamp = Timestamp.valueOf(simpleDate.format(nowdate));
        return timestamp;
    }
}
